import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/dashboard'
        },
        {
            path: '/',
            component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'),
            meta: { title: '自述文件' },
            children: [
                {
                    path: '/dashboard',
                    component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'),
                    meta: { title: '系统首页' }
                },
                /* {
                     path: '/organization',
                     component: () => import(/!* webpackChunkName: "table" *!/ '../components/page/Organization.vue'),
                     meta: { title: '组织机构' }
                 },*/
                {
                    path: '/achievement',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/Achievement.vue'),
                    meta: { title: '本月业绩' }
                },

                {
                    path: '/adjustment',
                    component: () => import(/*webpackChunkName: "profile" */ '../components/page/Adjustment.vue'),
                    meta: { title: '工资调整' }
                },
                /* {
                     path: '/organization',
                     component: () => import(/!* webpackChunkName: "table" *!/ '../components/page/Organization.vue'),
                     meta: { title: '组织机构' }
                 },*/
                // {
                //     path: '/achievement',
                //     component: () => import(/* webpackChunkName: "table" */ '../components/page/Achievement.vue'),
                //     meta: { title: '本月业绩' }
                // },
                {
                    path: '/dep',
                    component: () => import(/* webpackChunkName: "drag" */ '../components/page/Department.vue'),
                    meta: { title: '部门管理' }
                },

                {
                    path: '/adjustment',
                    component: () => import(/*webpackChunkName: "profile" */ '../components/page/Adjustment.vue'),
                    meta: { title: '工资调整' }
                },
                {
                    // 合同展示组件
                    path: '/contractShow',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/ContractShow.vue'),
                    meta: { title: '合同展示' }
                },
                {
                    // 合同时效查询组件
                    path: '/contractTime',
                    component: () => import(/* webpackChunkName: "upload" */ '../components/page/ContractTime.vue'),
                    meta: { title: '合同时效' }
                },
                {
                    // 装修团队
                    path: '/comeIn',
                    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/ComeIn.vue'),
                    meta: { title: '装修团队' }
                },
                {
                    // 员工录入
                    path: '/comeInStaffAndDesigner',
                    component: () => import(/* webpackChunkName: "dragdialog" */ '../components/page/ComeInStaffAndDesigner.vue'),
                    meta: { title: '员工录入' }
                },
                {
                    path: '/tabs',
                    component: () => import(/* webpackChunkName: "tabs" */ '../components/page/Tabs.vue'),
                    meta: { title: '消息处理' }
                },
                {
                    path: '/apply',
                    component: () => import(/* webpackChunkName: "form" */ '../components/page/ApllicationForm.vue'),
                    meta: { title: '业务申报' }
                },

                {
                    path: '/404',
                    component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'),
                    meta: { title: '404' }
                },
                {
                    path: '/403',
                    component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'),
                    meta: { title: '403' }
                },
                {
                    path: '/icon',
                    component: () => import(/* webpackChunkName: "icon" */ '../components/page/Icon.vue'),
                    meta: { title: '自定义图标' }
                },
                {
                    path: '/decoration',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/DecorationManagement.vue'),
                    meta: { title: '装修团队' }
                },
                {
                    path: '/staff',
                    component: () => import(/* webpackChunkName: "table" */ '../components/page/StaffManagement.vue'),
                    meta: { title: '员工管理' }
                }
            ]
        },
        {
            path: '/login',
            component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '*',
            redirect: '/404'
        }
    ]
});
